package com.bsth.entity.schedule;

import com.bsth.entity.Line;
import com.bsth.rerun.RerunRule_input;
import com.bsth.shiftloop.ScheduleResult_output;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.*;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Date;
import java.util.List;

/**
 * 排班计划明细。
 * 内部字段全冗余，无关联对象（外键关联关系），
 * 可以单独存在，其余表要关联此对象/表，必须使用中间对象/表。
 */
@Entity
@Table(name = "bsth_c_s_sp_info")
public class SchedulePlanInfo extends BEntity {

    /** 主键Id */
    @Id
    @GeneratedValue
    private Long id;

    /** 排班计划日期 */
    @Column(nullable = false)
    private Date scheduleDate;

    /** 关联的公司名称 */
    private String gsName;
    /** 关联的公司编码 */
    private String gsBm;
    /** 关联的分公司名称 */
    private String fgsName;
    /** 关联的分公司编码 */
    private String fgsBm;
    /** 出场顺序号 */
    private Integer ccno;

    /** 关联 bsth_c_line 主键，不做mapping */
    @Column(nullable = false)
    private Integer xl;
    /** 线路名称 */
    @Column(nullable = false)
    private String xlName;
    /** 线路编码 */
    @Column(nullable = false)
    private String xlBm;

    /** 关联 bsth_c_s_gbi 主键，不做mapping */
    @Column(nullable = false)
    private Long lp;
    /** 路牌名称 */
    @Column(nullable = false)
    private String lpName;

    /** 关联 bsth_c_cars 主键，不做mapping */
    @Column(nullable = false)
    private Integer cl;
    /** 车辆自编号 */
    @Column(nullable = false)
    private String clZbh;

    /** 当分班的时候，驾驶员会不一样，具体根据规则，还有时刻表决定 */
    /** 报道时间（格式 HH:mm） */
    private String bdTime;
    /** 出场时间（格式 HH:mm） */
    private String ccTime;
    /** 关联的驾驶员 bsth_c_personnel 主键，不做mapping */
    @Column(nullable = false)
    private Integer j;
    /** 驾驶员工号 */
    @Column(nullable = false)
    private String jGh;
    /** 驾驶员名字 */
    @Column(nullable = false)
    private String jName;
    /** 关联的售票员 bsth_c_personnel 主键，不做mapping */
    private Integer s;
    /** 售票员工号 */
    private String sGh;
    /** 售票员名字 */
    private String sName;

    // 冗余的时刻明细信息，不做mapping
    /** 线路方向（TODO：上下行，上行，下行，这个以后用枚举还是字典再议，现在先用文字） */
    @Column(nullable = false)
    private String xlDir;
    /** 起点站id，根据班次类型，会关联 bsth_c_station，或 bsth_c_car_park，不做mapping */
    // 这个字段以后不用了
//    @Column(nullable = false)
//    private Integer qdz;
    /** 起点站code */
    private String qdzCode;
    /** 起点站名字 */
    @Column(nullable = false)
    private String qdzName;
    /** 终点站id，根据班次类型，会关联 bsth_c_station，或 bsth_c_car_park，不做mapping */
    // 这个字段以后不用了
//    @Column(nullable = false)
//    private Integer zdz;
    /** 终点站code */
    private String zdzCode;
    /** 终点站名字 */
    @Column(nullable = false)
    private String zdzName;

    /** 发车时间（格式 HH:mm） */
    @Column(nullable = false)
    private String fcsj;
    /** 发车顺序号 */
    @Column(nullable = false)
    private Integer fcno;
    /** 对应班次数 */
    @Column(nullable = false)
    private Integer bcs;
    /** 计划里程 */
    private Double jhlc;
    /** 班次历时 */
    private Integer bcsj;

    /** 班次类型 字典type=ScheduleType */
    @Column(nullable = false)
    private String bcType;

    // 重要的新增字段
    /** 关联的时刻表id */
    private Long ttInfo;
    /** 关联的时刻表名字 */
    private String ttInfoName;

    /** 时刻表的明细备注 */
    private String remark;


//    @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
//    @JoinTable(
//            name = "bsth_c_s_sp_r_info",
//            joinColumns = @JoinColumn(name = "sp_info_id"),
//            inverseJoinColumns = @JoinColumn(name = "sp_id")
//    )
//    private SchedulePlan schedulePlan;

    @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
    private SchedulePlan schedulePlan;

    public SchedulePlanInfo() {}

    // 对应班车套跑
    public void setRerunInfoDybc(RerunRule_input rerunRule_input) {
        this.cl = rerunRule_input.getCl();
        this.clZbh = rerunRule_input.getZbh();
        this.j = rerunRule_input.getJ();
        this.jGh = rerunRule_input.getJgh();
        this.jName = rerunRule_input.getJname();
        this.s = rerunRule_input.getS();
        this.sGh = rerunRule_input.getSgh();
        this.sName = rerunRule_input.getSname();
    }

    // 对应路牌套跑
    public void setRerunInfoDylp(CarConfigInfo cc, List ec, String useType, String useHrType) {
        if ("hr".equals(useType)) {
            // 关联的驾驶员
            EmployeeConfigInfo employeeConfigInfo = null;
            if ("all".equals(useHrType)) {
                employeeConfigInfo = (EmployeeConfigInfo) ec.get(0);
            } else if ("zb".equals(useHrType)) {
                employeeConfigInfo = (EmployeeConfigInfo) ec.get(0);
            } else if ("wb".equals(useHrType)) {
                if (ec.size() > 1) {
                    employeeConfigInfo = (EmployeeConfigInfo) ec.get(1);
                } else {
                    employeeConfigInfo = (EmployeeConfigInfo) ec.get(0);
                }
            }

            this.j = employeeConfigInfo.getJsy().getId();
//        this.jGh = employeeConfigInfo.getJsy().getJobCode();
            if (StringUtils.isNotEmpty(employeeConfigInfo.getJsy().getJobCode())) {
                String[] jsy_temp = employeeConfigInfo.getJsy().getJobCode().split("-");
                if (jsy_temp.length > 1) {
                    this.jGh = jsy_temp[1];
                } else {
                    this.jGh = jsy_temp[0];
                }
            }
            this.jName = employeeConfigInfo.getJsy().getPersonnelName();
            // 关联的售票员
            if (employeeConfigInfo.getSpy() != null) {
                this.s = employeeConfigInfo.getSpy().getId();
//            this.sGh = employeeConfigInfo.getSpy().getJobCode();
                if (StringUtils.isNotEmpty(employeeConfigInfo.getSpy().getJobCode())) {
                    String[] spy_temp = employeeConfigInfo.getSpy().getJobCode().split("-");
                    if (spy_temp.length > 1) {
                        this.sGh = spy_temp[1];
                    } else {
                        this.sGh = spy_temp[0];
                    }
                }

                this.sName = employeeConfigInfo.getSpy().getPersonnelName();
            }
        } else if ("hc".equals(useType)) {
            // 关联的车辆信息
            this.cl = cc.getCl().getId(); // 车辆id
            this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号
        } else { // 所有的
            // 关联的车辆信息
            this.cl = cc.getCl().getId(); // 车辆id
            this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号

            // 关联的驾驶员
            EmployeeConfigInfo employeeConfigInfo = null;
            if ("all".equals(useHrType)) {
                employeeConfigInfo = (EmployeeConfigInfo) ec.get(0);
            } else if ("zb".equals(useHrType)) {
                employeeConfigInfo = (EmployeeConfigInfo) ec.get(0);
            } else if ("wb".equals(useHrType)) {
                if (ec.size() > 1) {
                    employeeConfigInfo = (EmployeeConfigInfo) ec.get(1);
                } else {
                    employeeConfigInfo = (EmployeeConfigInfo) ec.get(0);
                }
            }

            this.j = employeeConfigInfo.getJsy().getId();
//        this.jGh = employeeConfigInfo.getJsy().getJobCode();
            if (StringUtils.isNotEmpty(employeeConfigInfo.getJsy().getJobCode())) {
                String[] jsy_temp = employeeConfigInfo.getJsy().getJobCode().split("-");
                if (jsy_temp.length > 1) {
                    this.jGh = jsy_temp[1];
                } else {
                    this.jGh = jsy_temp[0];
                }
            }
            this.jName = employeeConfigInfo.getJsy().getPersonnelName();
            // 关联的售票员
            if (employeeConfigInfo.getSpy() != null) {
                this.s = employeeConfigInfo.getSpy().getId();
//            this.sGh = employeeConfigInfo.getSpy().getJobCode();
                if (StringUtils.isNotEmpty(employeeConfigInfo.getSpy().getJobCode())) {
                    String[] spy_temp = employeeConfigInfo.getSpy().getJobCode().split("-");
                    if (spy_temp.length > 1) {
                        this.sGh = spy_temp[1];
                    } else {
                        this.sGh = spy_temp[0];
                    }
                }

                this.sName = employeeConfigInfo.getSpy().getPersonnelName();
            }
        }

    }

    public SchedulePlanInfo(
            Line xl,
            ScheduleResult_output scheduleResult_output,
            TTInfoDetail ttInfoDetail,
            Boolean isFb,
            CarConfigInfo carConfigInfo,
            List<EmployeeConfigInfo> employeeConfigInfoList,
            SchedulePlan schedulePlan,
            boolean isFirstBc, // 是否第一个班次
            boolean isLastBc // 是否最后一个班次
        ) {

        // TODO：关联的公司名称
        // TODO：关联的公司编码
        this.gsBm = xl.getCompany();
        // TODO：关联的分公司名称
        // TODO：关联的分公司编码
        this.fgsBm = xl.getBrancheCompany();
        // TODO：关联的出场顺序号

        // 关联的排班计划
        this.schedulePlan = schedulePlan;

        // 排班计划时间
        this.scheduleDate = scheduleResult_output.getSd().toDate();

        // 关联的线路信息
        this.xl = xl.getId(); // 线路id
        this.xlBm = xl.getLineCode(); // 线路编码
        this.xlName = xl.getName(); // 线路名称

        // 关联的路牌
        this.lp = ttInfoDetail.getLp().getId();
        this.lpName = ttInfoDetail.getLp().getLpName();

        // 关联的车辆信息
        this.cl = carConfigInfo.getCl().getId(); // 车辆id
        this.clZbh = carConfigInfo.getCl().getInsideCode(); // 自编号/内部编号

        // TODO：报道时间，出场时间没有
        // 关联的驾驶员
        EmployeeConfigInfo employeeConfigInfo = null;
        if (isFb) {
            if (employeeConfigInfoList.size() > 1) {
                employeeConfigInfo = employeeConfigInfoList.get(1);
            } else {
                employeeConfigInfo = employeeConfigInfoList.get(0);
            }
        } else {
            employeeConfigInfo = employeeConfigInfoList.get(0);
        }

        this.j = employeeConfigInfo.getJsy().getId();
//        this.jGh = employeeConfigInfo.getJsy().getJobCode();
        if (StringUtils.isNotEmpty(employeeConfigInfo.getJsy().getJobCode())) {
            String[] jsy_temp = employeeConfigInfo.getJsy().getJobCode().split("-");
            if (jsy_temp.length > 1) {
                this.jGh = jsy_temp[1];
            } else {
                this.jGh = jsy_temp[0];
            }
        }
        this.jName = employeeConfigInfo.getJsy().getPersonnelName();
        // 关联的售票员
        if (employeeConfigInfo.getSpy() != null) {
            this.s = employeeConfigInfo.getSpy().getId();
//            this.sGh = employeeConfigInfo.getSpy().getJobCode();
            if (StringUtils.isNotEmpty(employeeConfigInfo.getSpy().getJobCode())) {
                String[] spy_temp = employeeConfigInfo.getSpy().getJobCode().split("-");
                if (spy_temp.length > 1) {
                    this.sGh = spy_temp[1];
                } else {
                    this.sGh = spy_temp[0];
                }
            }

            this.sName = employeeConfigInfo.getSpy().getPersonnelName();
        }

        // 时刻明细数据
        this.xlDir = ttInfoDetail.getXlDir(); // 线路上下行
        this.bcType = ttInfoDetail.getBcType(); // 班次类型
        this.qdzCode = ttInfoDetail.getQdzCode(); // 起点站code
        this.qdzName = ttInfoDetail.getQdzName(); // 起点站name
        this.zdzCode = ttInfoDetail.getZdzCode(); // 终点站code
        this.zdzName = ttInfoDetail.getZdzName(); // 终点站name

        this.fcsj = ttInfoDetail.getFcsj(); // 发车时间
        this.fcno = ttInfoDetail.getFcno(); // 发车顺序号
        this.bcs = ttInfoDetail.getBcs(); // 班次数
        this.jhlc = ttInfoDetail.getJhlc(); // 计划里程
        this.bcsj = ttInfoDetail.getBcsj(); // 班次时间

        // 使用的时刻表id
        this.ttInfo = ttInfoDetail.getTtinfo().getId();
        // 使用的时刻表名字
        this.ttInfoName = ttInfoDetail.getTtinfo().getName();

        // 备注信息
        this.remark = ttInfoDetail.getRemark();

        // 使用车辆配置的停车场信息
        String pzType = carConfigInfo.getPzType(); // 配置类型
        if (pzType != null && !pzType.equals("BSY")) {
            if ("ZW".equals(pzType)) { // 只看早晚进出场
                if (isFirstBc) { // 第一个班次是出场
//                    this.qdz = carConfigInfo.getTcc().getId(); // 起点站-停车场id
                    this.qdzCode = carConfigInfo.getTcc().getParkCode(); // 起点站-停车场code
                    this.qdzName = carConfigInfo.getTcc().getParkName(); // 起点站-停车场name

                    this.jhlc = "0".equals(this.xlDir) ? carConfigInfo.getUpOutLc() : carConfigInfo.getDownOutLc();
                    this.bcsj = "0".equals(this.xlDir) ? carConfigInfo.getUpOutSj().intValue() : carConfigInfo.getDownOutSj().intValue();

                } else if (isLastBc) { // 最后一个班次是进场
//                    this.zdz = carConfigInfo.getTcc().getId(); // 终点站-停车场id
                    this.zdzCode = carConfigInfo.getTcc().getParkCode(); // 终点站-停车场code
                    this.zdzName = carConfigInfo.getTcc().getParkName(); // 终点站-停车场name

                    this.jhlc = "0".equals(this.xlDir) ? carConfigInfo.getUpInLc() : carConfigInfo.getDownInLc();
                    this.bcsj = "0".equals(this.xlDir) ? carConfigInfo.getUpInSj().intValue() : carConfigInfo.getDownInSj().intValue();
                }

            } else if ("FS".equals(pzType)) { // 所有进出场
                if ("out".equals(this.bcType)) { // 出场班次
//                    this.qdz = carConfigInfo.getTcc().getId(); // 起点站-停车场id
                    this.qdzCode = carConfigInfo.getTcc().getParkCode(); // 起点站-停车场code
                    this.qdzName = carConfigInfo.getTcc().getParkName(); // 起点站-停车场name

                    this.jhlc = "0".equals(this.xlDir) ? carConfigInfo.getUpOutLc() : carConfigInfo.getDownOutLc();
                    this.bcsj = "0".equals(this.xlDir) ? carConfigInfo.getUpOutSj().intValue() : carConfigInfo.getDownOutSj().intValue();

                } else if ("in".equals(this.bcType)) {
//                    this.zdz = carConfigInfo.getTcc().getId(); // 终点站-停车场id
                    this.zdzCode = carConfigInfo.getTcc().getParkCode(); // 终点站-停车场code
                    this.zdzName = carConfigInfo.getTcc().getParkName(); // 终点站-停车场name

                    this.jhlc = "0".equals(this.xlDir) ? carConfigInfo.getUpInLc() : carConfigInfo.getDownInLc();
                    this.bcsj = "0".equals(this.xlDir) ? carConfigInfo.getUpInSj().intValue() : carConfigInfo.getDownInSj().intValue();
                }
            }
        }

    }

    public static String generateInsertSql() {
        String sql = "insert into bsth_c_s_sp_info " +
                " (schedule_date, gs_name, gs_bm, fgs_name, fgs_bm, ccno, " +
                "xl, xl_name, xl_bm, lp, lp_name, cl, cl_zbh, bd_time, cc_time, " +
                "j, j_gh, j_name, s, s_gh, s_name, " +
                "xl_dir, qdz_code, qdz_name, zdz_code, zdz_name, " +
                "fcsj, fcno, bcs, jhlc, bcsj, bc_type, " +
                "tt_info, tt_info_name, remark, schedule_plan, " +
                "create_by, update_by, create_date, update_date) " +
                "values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," +
                "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
        return sql;
    }

    public void preparedStatementSet(PreparedStatement ps) throws SQLException {
        if (this.scheduleDate != null) ps.setDate(1, new java.sql.Date(this.scheduleDate.getTime())); else ps.setNull(1, Types.DATE);
        if (this.gsName != null) ps.setString(2, this.gsName); else ps.setNull(2, Types.VARCHAR);
        if (this.gsBm != null) ps.setString(3, this.gsBm); else ps.setNull(3, Types.VARCHAR);
        if (this.fgsName != null) ps.setString(4, this.fgsName); else ps.setNull(4, Types.VARCHAR);
        if (this.fgsBm != null) ps.setString(5, this.fgsBm); else ps.setNull(5, Types.VARCHAR);
        if (this.ccno != null) ps.setInt(6, this.ccno); else ps.setNull(6, Types.INTEGER);
        if (this.xl != null) ps.setInt(7, this.xl); else ps.setNull(7, Types.INTEGER);
        if (this.xlName != null) ps.setString(8, this.xlName); else ps.setNull(8, Types.VARCHAR);
        if (this.xlBm != null) ps.setString(9, this.xlBm); else ps.setNull(9, Types.VARCHAR);
        if (this.lp != null) ps.setLong(10, this.lp); else ps.setNull(10, Types.BIGINT);
        if (this.lpName != null) ps.setString(11, this.lpName); else ps.setNull(11, Types.VARCHAR);
        if (this.cl != null) ps.setInt(12, this.cl); else ps.setNull(12, Types.INTEGER);
        if (this.clZbh != null) ps.setString(13, this.clZbh); else ps.setNull(13, Types.VARCHAR);
        if (this.bdTime != null) ps.setString(14, this.bdTime); else ps.setNull(14, Types.VARCHAR);
        if (this.ccTime != null) ps.setString(15, this.ccTime); else ps.setNull(15, Types.VARCHAR);
        if (this.j != null) ps.setInt(16, this.j); else ps.setNull(16, Types.INTEGER);
        if (this.jGh != null) ps.setString(17, this.jGh); else ps.setNull(17, Types.VARCHAR);
        if (this.jName != null) ps.setString(18, this.jName); else ps.setNull(18, Types.VARCHAR);
        if (this.s != null) ps.setInt(19, this.s); else ps.setNull(19, Types.INTEGER);
        if (this.sGh != null) ps.setString(20, this.sGh); else ps.setNull(20, Types.VARCHAR);
        if (this.sName != null) ps.setString(21, this.sName); else ps.setNull(21, Types.VARCHAR);
        if (this.xlDir != null) ps.setString(22, this.xlDir); else ps.setNull(22, Types.VARCHAR);
        if (this.qdzCode != null) ps.setString(23, this.qdzCode); else ps.setNull(23, Types.VARCHAR);
        if (this.qdzName != null) ps.setString(24, this.qdzName); else ps.setNull(24, Types.VARCHAR);
        if (this.zdzCode != null) ps.setString(25, this.zdzCode); else ps.setNull(25, Types.VARCHAR);
        if (this.zdzName != null) ps.setString(26, this.zdzName); else ps.setNull(26, Types.VARCHAR);
        if (this.fcsj != null) ps.setString(27, this.fcsj); else ps.setNull(27, Types.VARCHAR);
        if (this.fcno != null) ps.setInt(28, this.fcno); else ps.setNull(28, Types.INTEGER);
        if (this.bcs != null) ps.setInt(29, this.bcs); else ps.setNull(29, Types.INTEGER);
        if (this.jhlc != null) ps.setDouble(30, this.jhlc); else ps.setNull(30, Types.DOUBLE);
        if (this.bcsj != null) ps.setInt(31, this.bcsj); else ps.setNull(31, Types.INTEGER);
        if (this.bcType != null) ps.setString(32, this.bcType); else ps.setNull(32, Types.VARCHAR);
        if (this.ttInfo != null) ps.setLong(33, this.ttInfo); else ps.setNull(33, Types.BIGINT);
        if (this.ttInfoName != null) ps.setString(34, this.ttInfoName); else ps.setNull(34, Types.VARCHAR);
        if (this.remark != null) ps.setString(35, this.remark); else ps.setNull(35, Types.VARCHAR);
        if (this.schedulePlan != null) ps.setLong(36, this.schedulePlan.getId()); else ps.setNull(36, Types.BIGINT);
        if (this.getCreateBy() != null) ps.setInt(37, this.getCreateBy().getId()); else ps.setNull(37, Types.INTEGER);
        if (this.getUpdateBy() != null) ps.setInt(38, this.getUpdateBy().getId()); else ps.setNull(38, Types.INTEGER);
        if (this.getCreateDate() != null) ps.setTimestamp(39, new java.sql.Timestamp(this.getCreateDate().getTime())); else ps.setNull(39, Types.TIMESTAMP);
        if (this.getUpdateDate() != null) ps.setTimestamp(40, new java.sql.Timestamp(this.getUpdateDate().getTime())); else ps.setNull(40, Types.TIMESTAMP);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getScheduleDate() {
        return scheduleDate;
    }

    public void setScheduleDate(Date scheduleDate) {
        this.scheduleDate = scheduleDate;
    }

    public String getGsName() {
        return gsName;
    }

    public void setGsName(String gsName) {
        this.gsName = gsName;
    }

    public String getGsBm() {
        return gsBm;
    }

    public void setGsBm(String gsBm) {
        this.gsBm = gsBm;
    }

    public String getFgsName() {
        return fgsName;
    }

    public void setFgsName(String fgsName) {
        this.fgsName = fgsName;
    }

    public String getFgsBm() {
        return fgsBm;
    }

    public void setFgsBm(String fgsBm) {
        this.fgsBm = fgsBm;
    }

    public Integer getCcno() {
        return ccno;
    }

    public void setCcno(Integer ccno) {
        this.ccno = ccno;
    }

    public Integer getXl() {
        return xl;
    }

    public void setXl(Integer xl) {
        this.xl = xl;
    }

    public String getXlName() {
        return xlName;
    }

    public void setXlName(String xlName) {
        this.xlName = xlName;
    }

    public String getXlBm() {
        return xlBm;
    }

    public void setXlBm(String xlBm) {
        this.xlBm = xlBm;
    }

    public Long getLp() {
        return lp;
    }

    public void setLp(Long lp) {
        this.lp = lp;
    }

    public String getLpName() {
        return lpName;
    }

    public void setLpName(String lpName) {
        this.lpName = lpName;
    }

    public Integer getCl() {
        return cl;
    }

    public void setCl(Integer cl) {
        this.cl = cl;
    }

    public String getClZbh() {
        return clZbh;
    }

    public void setClZbh(String clZbh) {
        this.clZbh = clZbh;
    }

    public String getBdTime() {
        return bdTime;
    }

    public void setBdTime(String bdTime) {
        this.bdTime = bdTime;
    }

    public String getCcTime() {
        return ccTime;
    }

    public void setCcTime(String ccTime) {
        this.ccTime = ccTime;
    }

    public Integer getJ() {
        return j;
    }

    public void setJ(Integer j) {
        this.j = j;
    }

    public String getjGh() {
        return jGh;
    }

    public void setjGh(String jGh) {
        this.jGh = jGh;
    }

    public String getjName() {
        return jName;
    }

    public void setjName(String jName) {
        this.jName = jName;
    }

    public Integer getS() {
        return s;
    }

    public void setS(Integer s) {
        this.s = s;
    }

    public String getsGh() {
        return sGh;
    }

    public void setsGh(String sGh) {
        this.sGh = sGh;
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public String getXlDir() {
        return xlDir;
    }

    public void setXlDir(String xlDir) {
        this.xlDir = xlDir;
    }

    public String getQdzCode() {
        return qdzCode;
    }

    public void setQdzCode(String qdzCode) {
        this.qdzCode = qdzCode;
    }

    public String getQdzName() {
        return qdzName;
    }

    public void setQdzName(String qdzName) {
        this.qdzName = qdzName;
    }

    public String getZdzCode() {
        return zdzCode;
    }

    public void setZdzCode(String zdzCode) {
        this.zdzCode = zdzCode;
    }

    public String getZdzName() {
        return zdzName;
    }

    public void setZdzName(String zdzName) {
        this.zdzName = zdzName;
    }

    public String getFcsj() {
        return fcsj;
    }

    public void setFcsj(String fcsj) {
        this.fcsj = fcsj;
    }

    public Integer getFcno() {
        return fcno;
    }

    public void setFcno(Integer fcno) {
        this.fcno = fcno;
    }

    public Integer getBcs() {
        return bcs;
    }

    public void setBcs(Integer bcs) {
        this.bcs = bcs;
    }

    public Double getJhlc() {
        return jhlc;
    }

    public void setJhlc(Double jhlc) {
        this.jhlc = jhlc;
    }

    public Integer getBcsj() {
        return bcsj;
    }

    public void setBcsj(Integer bcsj) {
        this.bcsj = bcsj;
    }

    public String getBcType() {
        return bcType;
    }

    public void setBcType(String bcType) {
        this.bcType = bcType;
    }

    public Long getTtInfo() {
        return ttInfo;
    }

    public void setTtInfo(Long ttInfo) {
        this.ttInfo = ttInfo;
    }

    public String getTtInfoName() {
        return ttInfoName;
    }

    public void setTtInfoName(String ttInfoName) {
        this.ttInfoName = ttInfoName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public SchedulePlan getSchedulePlan() {
        return schedulePlan;
    }

    public void setSchedulePlan(SchedulePlan schedulePlan) {
        this.schedulePlan = schedulePlan;
    }
}
